package org.jeecg.modules.appuser.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.appuser.entity.TbUserUpgradeConfig;
import org.jeecg.modules.appuser.mapper.TbUserUpgradeConfigMapper;
import org.jeecg.modules.appuser.service.ITbUserUpgradeConfigService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * @Description: 升级条件表
 * @Author: jeecg-boot
 * @Date: 2020-05-18
 * @Version: V1.0
 */
@Service
public class TbUserUpgradeConfigServiceImpl extends ServiceImpl<TbUserUpgradeConfigMapper, TbUserUpgradeConfig> implements ITbUserUpgradeConfigService {

    @Override
    public Result<?> getNextUpgradeGameBuilding(Integer sort, Integer type) {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("sort", sort);
        queryWrapper.eq("type", type);
        TbUserUpgradeConfig tbUserUpgradeConfig = this.getOne(queryWrapper);
        return Result.ok(tbUserUpgradeConfig);

    }
}
